import interfaces.Detect;

import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.reflections.Reflections;

import util.ObjectDebug;
import entities.Domain;

public class HoanBNDemo {

	public static void main(String[] args) {

		try {
			Reflections reflections = new Reflections("detect");
			Set<Class<? extends Detect>> classes = reflections
					.getSubTypesOf(Detect.class);

			Map<String, Object> obj = new TreeMap<String, Object>();
			Domain domain = new Domain();// S3QueueHandle.getDomainInformationFromS3("getbootstrap.com");
			obj.put("domain", domain);

			Document doc = Jsoup.connect("http://getbootstrap.com/").get();
			obj.put("doc", doc);

			for (Class<? extends Detect> class1 : classes) {
				if (class1.getName().contains("DetectCss")) {
					try {
						class1.newInstance().getInfo(obj);
					} catch (Exception e) {
						e.printStackTrace();
					}
				}
			}

			ObjectDebug.debug(obj.get("domain"));

		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
